//
//  FFBaseAPi.m
//  fitness-iOS
//
//  Created by 卢仕彤 on 2017/12/14.
//  Copyright © 2017年 卢仕彤. All rights reserved.
//

#import "FFBaseAPi.h"
#import "FFCache.h"

@implementation FFBaseAPi

- (NSString *)apiHost {
    return [NSString stringWithFormat:@"%@", HOST];
}

- (NSMutableDictionary *)parametersDic {
    return [self parameters:self.apiParams];
}

- (NSMutableDictionary *)parameters:(NSDictionary *)parameters {
    NSMutableDictionary *parametersDic = [NSMutableDictionary dictionary];
    if (self.isSign) {
        NSMutableDictionary *parametersDic = [NSMutableDictionary dictionary];
        [parametersDic setValue:[FFCache token] forKey:@"token"];
        [parametersDic setValue:[FFCache equipment] forKey:@"equipment"];
        
    }
    
    [parametersDic addEntriesFromDictionary:parameters];
    
    return parametersDic;
}

@end
